import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {LoginComponent} from './login/login.component';
import {LayoutComponent} from './layout/layout.component';
import {ManagerComponent} from './manager/manager.component';
import {RoleComponent} from './role/role.component';
import {AccessComponent} from './access/access.component';
import {ProjectComponent} from './project/project.component';
import {UserComponent} from './user/user.component';
const routes: Routes = [
  {path: 'login', component: LoginComponent},
  {path: 'layout', component: LayoutComponent, children: [
      { path: 'manager',  component: ManagerComponent},
      { path: 'role',  component: RoleComponent},
      { path: 'access',  component: AccessComponent},
      { path: 'project',  component: ProjectComponent},
      { path: 'user',  component: UserComponent},
  ]},
  {path: '**', component: LoginComponent},
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
